<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>供应商平台</title>
</head>
<body class="tob-wrap">
	<div th:replace="common/top"></div>
	<article class="container container-b1-supplier clearfix">
		<div th:replace="common/left::side"></div>
		<section class="content">
			<h3 class="m-top-bar">
				<!--<img src="../images/temp/pic_30x30_01.jpg" alt="" /> <a href="#">HUAWEI
					Tech <icon class="icon-btn icon-btn-blue-close"></icon>
				</a>-->
			</h3>
			<div class="m-order-bar">
				<p>
					<strong>销售机会列表</strong> 
					<select name="" id="">
						<option value="">全部</option>
						<option value="">未开标</option>
						<option value="">已开标</option>
						<option value="">待创建合同</option>
						<option value="">已建合同</option>
					</select>
				</p>
			</div>
 			<div class="m-table-sell" th:each="pipelineItem:${pipelineItems}">
				<div class="m-table-cont">
					<table width="100%" summay="" cellpadding="0" cellspacing="0">
						<thead>
							<tr>
								<th>序号</th>
								<th>发标方</th>
								<th>描述</th>
								<th>性质</th>
								<th>招标截止时间</th>
								<th>讲标时间</th>
								<th>联系方式</th>
								<th>附件</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td th:text="${pipelineItemStat.count}">001</td>
								<td class="w100">
									<p th:text="${pipelineItem.tPipelineHeader.tCompany.companyName}">百度在线网络技术（北京）有限公司每行最多八个字</p>
								</td>
								<td class="w150">
									<p th:text="${pipelineItem.tPipelineHeader.description}">每行最多十二个字多了折行每行最多十二个字多了折行每行最多十二个字多了折行</p>
								</td>
								<td>
									<span class="status status-success" th:if="${pipelineItem.bidType eq 1}">招标</span>
									<span class="status status-success" th:if="${pipelineItem.bidType eq 2}">授予</span>
									<span class="status status-success" th:if="${pipelineItem.bidType eq 3}">议标</span>
									<span class="status status-success" th:if="${pipelineItem.bidType eq 4}">询价</span>
								</td>
								<!--<td><span th:if="${pipelineItem.closeTime ne null}" th:text="${#dates.format(pipelineItem.closeTime, 'yyyy-MM-dd')}">2015-05-23<br />14:30
								</span></td>-->
								<td><span th:if="${pipelineItem.closeTime ne null}" th:text="${#dates.format(pipelineItem.openTime, 'yyyy-MM-dd')}">2015-05-23<br />14:30
								</span></td>
								<td><span th:if="${pipelineItem.presentationTime ne null}" th:text="${#dates.format(pipelineItem.presentationTime, 'yyyy-MM-dd')}">2015-05-23<br />14:30
								</span></td>
								<td>
									<p>
										<span th:text="${pipelineItem.contactUser}">欧文贝克汉姆</span><br />
										<span th:text="${pipelineItem.contactPhone}">+86 13800138000</span><br />
										<span th:text="${pipelineItem.contactEmail}">abcdefg@163.com</span>
									</p>
								</td>
								<td><a href="#"><i class="icon icon-attachment"></i>
										附件1</a> <br /> <a href="#"><i class="icon icon-attachment"></i>
										附件1</a> <br /> <a href="#"><i class="icon icon-attachment"></i>
										附件1</a></td>
								<td>
									<a class="btn btn-cyan" th:if="${pipelineItem.bidType eq 1 and pipelineItem.accept eq false and #lists.contains(pipelineHeaderIds, pipelineItem.tPipelineHeader.id) eq false}" th:id="${'sale' + pipelineItemStat.count}" th:onclick="'javascript:participatePipeline('+${pipelineItemStat.count}+', '+${pipelineItem.id}+');'">参与投标</a>
									<a class="btn btn-orange" th:if="${pipelineItem.bidType eq 1 and pipelineItem.accept eq false and #lists.contains(pipelineHeaderIds, pipelineItem.tPipelineHeader.id) eq true}" th:id="${'sale' + pipelineItemStat.count}" th:onclick="'javascript:notParticipatePipeline('+${pipelineItemStat.count}+', '+${pipelineItem.id}+');'">不参与投标</a>
								</td>
								<tr class="tr-zb" th:each="pipelinePublic:${pipelineItem.tPipelineHeader.tPipelinePublics}">
									<td><i th:if="${pipelinePublic.finalWin eq true}" class="icon icon-zb"></i></td>
									<td colspan="2" class="w250 txL">
										<p th:text="${pipelinePublic.tVendor.tSupplier.companyName}">百度在线网络技术（北京）有限公司啊截字截字截</p>
									</td>
									<td class="txL" colspan="3">
										<p>
											<span th:if="${pipelineItem.bidType ne 3}">
											投标金额: <strong class="orange" th:if="${pipelinePublic.bidPrice ne null}" th:text="${'￥'+ pipelinePublic.bidPrice}">￥0</strong>
												   <strong class="orange" th:if="${pipelinePublic.bidPrice eq null}" th:text="${'￥0'}">￥0</strong>
												   </span>
										</p>
									</td>
									<td class="txL" colspan="2">
										<p>
										<span th:if="${pipelineItem.bidType ne 3}">
											投标分数: 
													<span th:if="${pipelinePublic.compMark ne null}" th:text="${pipelinePublic.compMark}">0分</span>
											<i class="icon icon-info"></i>
											</span>
										</p>
									</td>
									<td><a href="/supplier/preCreateOrder.htm" th:if="${pipelinePublic.finalWin eq true}" th:remove="all">创建销售订单</a>
										<a th:if="${pipelineItem.bidType eq 4 and pipelinePublic.tVendor.tSupplier.id eq session.currentUser.tCompany.id}" th:onclick="'javascript:inputBidPrice('+${pipelinePublic.id}+');'" style="cursor: pointer;">参与报价</a>
									</td>
								</tr>
								
								
							</tr>
							
							<!-- <tr>
								<td></td>
								<td colspan="2" class="w250 txL">
									<p>杭州阿里巴巴网络技术信息有限公司</p>
								</td>
								<td class="txL" colspan="3">
									<p>
										投标金额: <strong class="orange">￥280000</strong>
									</p>
								</td>
								<td class="txL" colspan="2">
									<p>
										投标分数: <span>70分</span> <i class="icon icon-info"></i>
									</p>
								</td>
								<td><a href="#">申诉(点击弹窗写入message)</a></td>
							</tr> -->
						</tbody>
					</table>
				</div>
			</div> 
			
			<div class="m-table-sell" th:remove="all">
				<div class="m-table-cont">
					<table width="100%" summay="" cellpadding="0" cellspacing="0">
						<thead>
							<tr>
								<th>序号</th>
								<th>发标方</th>
								<th>描述</th>
								<th>性质</th>
								<th>招标截止时间</th>
								<th>讲标时间</th>
								<th>联系方式</th>
								<th>附件</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>001</td>
								<td class="w100">
									<p>百度在线网络技术（北京）有限公司每行最多八个字</p>
								</td>
								<td class="w150">
									<p>每行最多十二个字多了折行每行最多十二个字多了折行每行最多十二个字多了折行</p>
								</td>
								<td><span class="status status-success">招标</span></td>
								<td><span>2015-05-23<br />14:30
								</span></td>
								<td><span>2015-05-23<br />14:30
								</span></td>
								<td>
									<p>
										欧文贝克汉姆<br />+86 13800138000<br />abcdefg@163.com
									</p>
								</td>
								<td><a href="#"><i class="icon icon-attachment"></i>
										附件1</a> <br /> <a href="#"><i class="icon icon-attachment"></i>
										附件1</a> <br /> <a href="#"><i class="icon icon-attachment"></i>
										附件1</a></td>
								<td><a class="btn btn-orange" href="javascript:changsalebtnimg('001','url')" id="sale001">不参与投标</a></td><!-- 连接的ID和方法的ID一样 不重复就行-->
							</tr>
							<tr class="tr-zb">
								<td><i class="icon icon-zb"></i></td>
								<td colspan="2" class="w250 txL">
									<p>百度在线网络技术（北京）有限公司啊截字截字截</p>
								</td>
								<td class="txL" colspan="3">
									<p>
										投标金额: <strong class="orange">￥360000</strong>
									</p>
								</td>
								<td class="txL" colspan="2">
									<p>
										投标分数: <span>100分</span> <i class="icon icon-info"></i>
									</p>
								</td>
								<td><a href="/supplier/preCreateOrder.htm">创建销售订单</a></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" class="w250 txL">
									<p>杭州阿里巴巴网络技术信息有限公司</p>
								</td>
								<td class="txL" colspan="3">
									<p>
										投标金额: <strong class="orange">￥280000</strong>
									</p>
								</td>
								<td class="txL" colspan="2">
									<p>
										投标分数: <span>70分</span> <i class="icon icon-info"></i>
									</p>
								</td>
								<td><a href="#">申诉</a></td>
							</tr>
							
						</tbody>
					</table>
				</div>
			</div>
			
		</section>
	</article>
</body>
<script th:inline="javascript">
	//<![CDATA[
	      
	      var errorMsg = /*[[${errorMsg}]]*/;
	      if(errorMsg){
	    	  alert(errorMsg);
	      }
          function participatePipeline(obj, pipelineId){
       	    	
        	  	if(!confirm("您确认要参与此次投标吗？")){
        	  		return;
        	  	}
        	  	window.location.href = "/supplier/participatePipeline?pipelineId=" + pipelineId;
          }
          function notParticipatePipeline(obj, pipelineId){
     	    	
      	  	if(!confirm("确定要删除此次投标吗？")){
      	  		return;
      	  	}
      	  	window.location.href = "/supplier/notParticipatePipeline?pipelineId=" + pipelineId;
         }
         function inputBidPrice(pipeinePublicId)
          {
            var price=prompt("请输入报价！","");
            if (price!=null && price != "")
            {
            	if(!validate(price)){
                	alert("价格输入格式有误！");
                	return;
                }
            	window.location.href = "/supplier/updateBidPrice?pipelinePublidId=" + pipeinePublicId + "&bidPrice="+price;
            }
          }
         function validate(num)
         {
           var reg = /^\d+(?=\.{0,1}\d+$|$)/
           if(reg.test(num)) 
        	   return true;
           return false ;  
         }
		//]]>
</script>  
  <script data-main="../js/page/b1_supplier" src="../lib/requirejs/require.js"></script>
</html>